<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>百分号</title>
  <style>
    html{
      height: 100%;
    }
    body{
      height: 100%;
    }
    div{
      /* vh用的比较少 */
      width: 50%;
      height: 50%;
      background-color: pink;
      /* 宽度是内容宽度，高度是内容高度 */
      box-sizing: content-box;
    }
  </style>
</head>
<body>
  <div>盒子</div>
</body>
</html>